package com.int_tech.MessageCodeAll.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by liubochao on 2018/6/29.
 */
@Entity
@Table(name = "c_kongshi")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@Accessors(chain = true)
public class KongshiTimes {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(length = 8)
    private Integer id;

    //车牌号
    @Column(length = 64)
    private String carNumber;

    //任务编号
    @Column(length = 64)
    private String messionNumber;

    //重驶时间
    @Column(length = 8)
    private float kongshiTime;

    //装车开始时间
    @Temporal(TemporalType.TIMESTAMP)
    private Date startOpenDoorTime;

    //装车结束时间
    @Temporal(TemporalType.TIMESTAMP)
    private Date startCloseDoorTime;

    //卸车开始时间
    @Temporal(TemporalType.TIMESTAMP)
    private Date endOpenDoorTime;

    //卸车结束时间
    @Temporal(TemporalType.TIMESTAMP)
    private Date endCloseDoorTime;

    //工时归入日期
    @Column(length =64)
    private String dateString;

    //创建时间
    @Temporal(TemporalType.TIMESTAMP)
    @Column(updatable = false)
    private Date createdTime;

    //更新时间
    @Temporal(TemporalType.TIMESTAMP)
    private Date updatedTime;

    //状态(0,初始状态；)
    @Column(length = 2)
    private int status;
}
